package com.idp.web.test.service.impl;

import com.idp.web.test.service.LogisticsService;
import com.idp.web.test.dao.LogisticsDao;
import com.idp.web.test.entity.Logistics;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.idp.common.persistence.Page;
import com.idp.common.util.ResourceUtils;

/**
 * 
 * 123213132service实现类
 * 
 * <pre>
 * 	历史记录：
 * 	2017-06-02 Amber
 * 	新建文件
 * </pre>
 * 
 * @author
 * 
 * 		<pre>
 * SD
 * 	Amber
 * PG
 *	Amber
 * UT
 *
 * MA
 *         </pre>
 * 
 * @version $Rev$
 *
 *          <p/>
 *          $Id$
 *
 */
@Service("logisticsService")
public class LogisticsServiceImpl implements LogisticsService {

	@Resource
	private LogisticsDao logisticsDao;

	@Override
	public Page<Logistics> findByPage(Logistics logistics, Page<Logistics> page) {

		page.setResult(logisticsDao.find(logistics, page));

		return page;
	}

	@Override
	public List<Logistics> findBySearch(Logistics logistics) {

		return logisticsDao.find(logistics);
	}

	@Override
	public Logistics getById(Integer id) {

		return logisticsDao.getById(id);
	}

	@Override
	public void add(Logistics logistics) {

		logisticsDao.add(logistics);
	}

	@Override
	public void update(Logistics logistics) {

		logisticsDao.update(logistics);
	}

	@Override
	public void delete(Integer id) {

		logisticsDao.delete(id);
	}

	@Override
	public List<Logistics> findLeft(Integer warehouseId) {
		return logisticsDao.findLeft(warehouseId);
	}

}